/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.openbrew.openbrewrf;

import java.io.Serializable;
import java.util.Collection;
import javax.persistence.Basic;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Lob;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlTransient;

/**
 *
 * @author chapmand
 */
@Entity
@Table(name = "Employee")
@XmlRootElement
@NamedQueries({
    @NamedQuery(name = "Employee.findAll", query = "SELECT e FROM Employee e ORDER BY e.empLastName ASC"),
    @NamedQuery(name = "Employee.findByEmpID", query = "SELECT e FROM Employee e WHERE e.empID = :empID"),
    @NamedQuery(name = "Employee.findByEmpLastName", query = "SELECT e FROM Employee e WHERE e.empLastName = :empLastName"),
    @NamedQuery(name = "Employee.findByEmpFirstName", query = "SELECT e FROM Employee e WHERE e.empFirstName = :empFirstName"),
    @NamedQuery(name = "Employee.findByUserName", query = "SELECT e FROM Employee e WHERE e.userName = :userName"),
    @NamedQuery(name = "Employee.findByUserPass", query = "SELECT e FROM Employee e WHERE e.userPass = :userPass"),
    @NamedQuery(name = "Employee.findByUserLevel", query = "SELECT e FROM Employee e WHERE e.userLevel = :userLevel"),
    @NamedQuery(name = "Employee.findByEmpPOApproval", query = "SELECT e FROM Employee e WHERE e.empPOApproval = :empPOApproval"),
    @NamedQuery(name = "Employee.findByEmpSysAdmin", query = "SELECT e FROM Employee e WHERE e.empSysAdmin = :empSysAdmin"),
    @NamedQuery(name = "Employee.findByEmpEmail", query = "SELECT e FROM Employee e WHERE e.empEmail = :empEmail"),
    @NamedQuery(name = "Employee.findByEmpEmailPass", query = "SELECT e FROM Employee e WHERE e.empEmailPass = :empEmailPass"),
    @NamedQuery(name = "Employee.findByEmpAxed", query = "SELECT e FROM Employee e WHERE e.empAxed = :empAxed"),
    @NamedQuery(name = "Employee.findByEmpPhone", query = "SELECT e FROM Employee e WHERE e.empPhone = :empPhone"),
    @NamedQuery(name = "Employee.findByBSalesAccess", query = "SELECT e FROM Employee e WHERE e.bSalesAccess = :bSalesAccess"),
    @NamedQuery(name = "Employee.findByBBrewingAccess", query = "SELECT e FROM Employee e WHERE e.bBrewingAccess = :bBrewingAccess"),
    @NamedQuery(name = "Employee.findByBCellaringAccess", query = "SELECT e FROM Employee e WHERE e.bCellaringAccess = :bCellaringAccess"),
    @NamedQuery(name = "Employee.findByBPackagingAccess", query = "SELECT e FROM Employee e WHERE e.bPackagingAccess = :bPackagingAccess"),
    @NamedQuery(name = "Employee.findByBLabAccess", query = "SELECT e FROM Employee e WHERE e.bLabAccess = :bLabAccess"),
    @NamedQuery(name = "Employee.findByBTaproomAccess", query = "SELECT e FROM Employee e WHERE e.bTaproomAccess = :bTaproomAccess"),
    @NamedQuery(name = "Employee.findByBBrewingNot", query = "SELECT e FROM Employee e WHERE e.bBrewingNot = :bBrewingNot"),
    @NamedQuery(name = "Employee.findByBCellaringNot", query = "SELECT e FROM Employee e WHERE e.bCellaringNot = :bCellaringNot"),
    @NamedQuery(name = "Employee.findByBPackagingNot", query = "SELECT e FROM Employee e WHERE e.bPackagingNot = :bPackagingNot"),
    @NamedQuery(name = "Employee.findByBSalesNot", query = "SELECT e FROM Employee e WHERE e.bSalesNot = :bSalesNot"),
    @NamedQuery(name = "Employee.findByBPurchasingNot", query = "SELECT e FROM Employee e WHERE e.bPurchasingNot = :bPurchasingNot"),
    @NamedQuery(name = "Employee.findByBARApproval", query = "SELECT e FROM Employee e WHERE e.bARApproval = :bARApproval"),
    @NamedQuery(name = "Employee.findByAcetaldehyde", query = "SELECT e FROM Employee e WHERE e.acetaldehyde = :acetaldehyde"),
    @NamedQuery(name = "Employee.findByIsoamyl", query = "SELECT e FROM Employee e WHERE e.isoamyl = :isoamyl"),
    @NamedQuery(name = "Employee.findByDiacetyl", query = "SELECT e FROM Employee e WHERE e.diacetyl = :diacetyl"),
    @NamedQuery(name = "Employee.findByDms", query = "SELECT e FROM Employee e WHERE e.dms = :dms"),
    @NamedQuery(name = "Employee.findByTrans2", query = "SELECT e FROM Employee e WHERE e.trans2 = :trans2"),
    @NamedQuery(name = "Employee.findByInfected", query = "SELECT e FROM Employee e WHERE e.infected = :infected"),
    @NamedQuery(name = "Employee.findByUName", query = "SELECT e FROM Employee e WHERE e.userName = ?1")})
public class Employee implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Basic(optional = false)
    @Column(name = "EmpID")
    private Integer empID;
    @Basic(optional = false)
    @NotNull
    @Size(min = 0, max = 30)
    @Column(name = "EmpLastName")
    private String empLastName;
    @Basic(optional = false)
    @NotNull
    @Size(min = 0, max = 30)
    @Column(name = "EmpFirstName")
    private String empFirstName;
    @Basic(optional = false)
    @NotNull
    @Size(min = 0, max = 30)
    @Column(name = "userName")
    private String userName;
    @Basic(optional = false)
    @NotNull
    @Size(min = 0, max = 30)
    @Column(name = "userPass")
    private String userPass;
    @Basic(optional = false)
    @NotNull
    @Column(name = "userLevel")
    private int userLevel;
    @Basic(optional = false)
    @NotNull
    @Column(name = "EmpPOApproval")
    private boolean empPOApproval;
    @Basic(optional = false)
    @NotNull
    @Column(name = "EmpSysAdmin")
    private boolean empSysAdmin;
    @Basic(optional = false)
    @NotNull
    @Size(min = 0, max = 100)
    @Column(name = "EmpEmail")
    private String empEmail;
    @Basic(optional = false)
    @NotNull
    @Size(min = 0, max = 40)
    @Column(name = "EmpEmailPass")
    private String empEmailPass;
    @Basic(optional = false)
    @NotNull
    @Column(name = "EmpAxed")
    private boolean empAxed;
    @Basic(optional = false)
    @NotNull
    @Size(min = 0, max = 30)
    @Column(name = "EmpPhone")
    private String empPhone;
    @Basic(optional = false)
    @NotNull
    @Lob
    @Size(min = 0, max = 16777215)
    @Column(name = "EmpFavorites")
    private String empFavorites;
    @Basic(optional = false)
    @NotNull
    @Column(name = "bSalesAccess")
    private boolean bSalesAccess;
    @Basic(optional = false)
    @NotNull
    @Column(name = "bBrewingAccess")
    private boolean bBrewingAccess;
    @Basic(optional = false)
    @NotNull
    @Column(name = "bCellaringAccess")
    private boolean bCellaringAccess;
    @Basic(optional = false)
    @NotNull
    @Column(name = "bPackagingAccess")
    private boolean bPackagingAccess;
    @Basic(optional = false)
    @NotNull
    @Column(name = "bLabAccess")
    private boolean bLabAccess;
    @Basic(optional = false)
    @NotNull
    @Column(name = "bTaproomAccess")
    private boolean bTaproomAccess;
    @Basic(optional = false)
    @NotNull
    @Column(name = "bBrewingNot")
    private boolean bBrewingNot;
    @Basic(optional = false)
    @NotNull
    @Column(name = "bCellaringNot")
    private boolean bCellaringNot;
    @Basic(optional = false)
    @NotNull
    @Column(name = "bPackagingNot")
    private boolean bPackagingNot;
    @Basic(optional = false)
    @NotNull
    @Column(name = "bSalesNot")
    private boolean bSalesNot;
    @Basic(optional = false)
    @NotNull
    @Column(name = "bPurchasingNot")
    private boolean bPurchasingNot;
    @Basic(optional = false)
    @NotNull
    @Column(name = "bARApproval")
    private boolean bARApproval;
    @Basic(optional = false)
    @NotNull
    @Column(name = "Acetaldehyde")
    private int acetaldehyde;
    @Basic(optional = false)
    @NotNull
    @Column(name = "Isoamyl")
    private int isoamyl;
    @Basic(optional = false)
    @NotNull
    @Column(name = "Diacetyl")
    private int diacetyl;
    @Basic(optional = false)
    @NotNull
    @Column(name = "DMS")
    private int dms;
    @Basic(optional = false)
    @NotNull
    @Column(name = "Trans2")
    private int trans2;
    @Basic(optional = false)
    @NotNull
    @Column(name = "Infected")
    private int infected;
    @Basic(optional = false)
    @NotNull
    @Column(name = "bRecipeModification")
    private boolean empbRecipeMod;
    @OneToMany(cascade = CascadeType.ALL, mappedBy = "emp")
    private Collection<Routes> routeCollection;
    @OneToMany(cascade = CascadeType.ALL, mappedBy = "vCEmpID")
    private Collection<VesselCleaningHistory> vchCollection;
    @OneToMany(cascade = CascadeType.ALL, mappedBy = "eCEmpID")
    private Collection<EquipmentCleaningHistory> echCollection;
    @OneToMany(mappedBy = "billingEmp")
    private Collection<Administration> adminCollection1;
    @OneToMany(mappedBy = "salesEmp")
    private Collection<Administration> adminCollection2;
    @OneToMany(mappedBy = "apEmp")
    private Collection<Administration> adminCollection3;

    public Employee() {
    }

    public Employee(Integer empID) {
        this.empID = empID;
    }

    public Employee(Integer empID, String empLastName, String empFirstName, String userName, String userPass, int userLevel, boolean empPOApproval, boolean empSysAdmin, String empEmail, String empEmailPass, boolean empAxed, String empPhone, String empFavorites, boolean bSalesAccess, boolean bBrewingAccess, boolean bCellaringAccess, boolean bPackagingAccess, boolean bLabAccess, boolean bTaproomAccess, boolean bBrewingNot, boolean bCellaringNot, boolean bPackagingNot, boolean bSalesNot, boolean bPurchasingNot, boolean bARApproval, int acetaldehyde, int isoamyl, int diacetyl, int dms, int trans2, int infected) {
        this.empID = empID;
        this.empLastName = empLastName;
        this.empFirstName = empFirstName;
        this.userName = userName;
        this.userPass = userPass;
        this.userLevel = userLevel;
        this.empPOApproval = empPOApproval;
        this.empSysAdmin = empSysAdmin;
        this.empEmail = empEmail;
        this.empEmailPass = empEmailPass;
        this.empAxed = empAxed;
        this.empPhone = empPhone;
        this.empFavorites = empFavorites;
        this.bSalesAccess = bSalesAccess;
        this.bBrewingAccess = bBrewingAccess;
        this.bCellaringAccess = bCellaringAccess;
        this.bPackagingAccess = bPackagingAccess;
        this.bLabAccess = bLabAccess;
        this.bTaproomAccess = bTaproomAccess;
        this.bBrewingNot = bBrewingNot;
        this.bCellaringNot = bCellaringNot;
        this.bPackagingNot = bPackagingNot;
        this.bSalesNot = bSalesNot;
        this.bPurchasingNot = bPurchasingNot;
        this.bARApproval = bARApproval;
        this.acetaldehyde = acetaldehyde;
        this.isoamyl = isoamyl;
        this.diacetyl = diacetyl;
        this.dms = dms;
        this.trans2 = trans2;
        this.infected = infected;
    }

    public Integer getEmpID() {
        return empID;
    }

    public void setEmpID(Integer empID) {
        this.empID = empID;
    }

    public String getEmpLastName() {
        return empLastName;
    }

    public void setEmpLastName(String empLastName) {
        this.empLastName = empLastName;
    }

    public String getEmpFirstName() {
        return empFirstName;
    }

    public void setEmpFirstName(String empFirstName) {
        this.empFirstName = empFirstName;
    }

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public String getUserPass() {
        return userPass;
    }

    public void setUserPass(String userPass) {
        this.userPass = userPass;
    }

    public int getUserLevel() {
        return userLevel;
    }

    public void setUserLevel(int userLevel) {
        this.userLevel = userLevel;
    }

    public boolean getEmpPOApproval() {
        return empPOApproval;
    }

    public void setEmpPOApproval(boolean empPOApproval) {
        this.empPOApproval = empPOApproval;
    }

    public boolean getEmpSysAdmin() {
        return empSysAdmin;
    }

    public void setEmpSysAdmin(boolean empSysAdmin) {
        this.empSysAdmin = empSysAdmin;
    }

    public String getEmpEmail() {
        return empEmail;
    }

    public void setEmpEmail(String empEmail) {
        this.empEmail = empEmail;
    }

    public String getEmpEmailPass() {
        return empEmailPass;
    }

    public void setEmpEmailPass(String empEmailPass) {
        this.empEmailPass = empEmailPass;
    }

    public boolean getEmpAxed() {
        return empAxed;
    }

    public void setEmpAxed(boolean empAxed) {
        this.empAxed = empAxed;
    }

    public String getEmpPhone() {
        return empPhone;
    }

    public void setEmpPhone(String empPhone) {
        this.empPhone = empPhone;
    }

    public String getEmpFavorites() {
        return empFavorites;
    }

    public void setEmpFavorites(String empFavorites) {
        this.empFavorites = empFavorites;
    }

    public boolean getBSalesAccess() {
        return bSalesAccess;
    }

    public void setBSalesAccess(boolean bSalesAccess) {
        this.bSalesAccess = bSalesAccess;
    }

    public boolean getBBrewingAccess() {
        return bBrewingAccess;
    }

    public void setBBrewingAccess(boolean bBrewingAccess) {
        this.bBrewingAccess = bBrewingAccess;
    }

    public boolean getBCellaringAccess() {
        return bCellaringAccess;
    }

    public void setBCellaringAccess(boolean bCellaringAccess) {
        this.bCellaringAccess = bCellaringAccess;
    }

    public boolean getBPackagingAccess() {
        return bPackagingAccess;
    }

    public void setBPackagingAccess(boolean bPackagingAccess) {
        this.bPackagingAccess = bPackagingAccess;
    }

    public boolean getBLabAccess() {
        return bLabAccess;
    }

    public void setBLabAccess(boolean bLabAccess) {
        this.bLabAccess = bLabAccess;
    }

    public boolean getBTaproomAccess() {
        return bTaproomAccess;
    }

    public void setBTaproomAccess(boolean bTaproomAccess) {
        this.bTaproomAccess = bTaproomAccess;
    }

    public boolean getBBrewingNot() {
        return bBrewingNot;
    }

    public void setBBrewingNot(boolean bBrewingNot) {
        this.bBrewingNot = bBrewingNot;
    }

    public boolean getBCellaringNot() {
        return bCellaringNot;
    }

    public void setBCellaringNot(boolean bCellaringNot) {
        this.bCellaringNot = bCellaringNot;
    }

    public boolean getBPackagingNot() {
        return bPackagingNot;
    }

    public void setBPackagingNot(boolean bPackagingNot) {
        this.bPackagingNot = bPackagingNot;
    }

    public boolean getBSalesNot() {
        return bSalesNot;
    }

    public void setBSalesNot(boolean bSalesNot) {
        this.bSalesNot = bSalesNot;
    }

    public boolean getBPurchasingNot() {
        return bPurchasingNot;
    }

    public void setBPurchasingNot(boolean bPurchasingNot) {
        this.bPurchasingNot = bPurchasingNot;
    }

    public boolean getBARApproval() {
        return bARApproval;
    }

    public void setBARApproval(boolean bARApproval) {
        this.bARApproval = bARApproval;
    }

    public int getAcetaldehyde() {
        return acetaldehyde;
    }

    public void setAcetaldehyde(int acetaldehyde) {
        this.acetaldehyde = acetaldehyde;
    }

    public int getIsoamyl() {
        return isoamyl;
    }

    public void setIsoamyl(int isoamyl) {
        this.isoamyl = isoamyl;
    }

    public int getDiacetyl() {
        return diacetyl;
    }

    public void setDiacetyl(int diacetyl) {
        this.diacetyl = diacetyl;
    }

    public int getDms() {
        return dms;
    }

    public void setDms(int dms) {
        this.dms = dms;
    }

    public int getTrans2() {
        return trans2;
    }

    public void setTrans2(int trans2) {
        this.trans2 = trans2;
    }

    public int getInfected() {
        return infected;
    }

    public void setInfected(int infected) {
        this.infected = infected;
    }

    public boolean isEmpbRecipeMod() {
        return empbRecipeMod;
    }

    public void setEmpbRecipeMod(boolean empbRecipeMod) {
        this.empbRecipeMod = empbRecipeMod;
    }

    @XmlTransient
    public Collection<Routes> getRouteCollection() {
        return routeCollection;
    }

    public void setRouteCollection(Collection<Routes> routeCollection) {
        this.routeCollection = routeCollection;
    }

    @XmlTransient
    public Collection<VesselCleaningHistory> getVCHCollection() {
        return vchCollection;
    }

    public void setVCHCollection(Collection<VesselCleaningHistory> vchCollection) {
        this.vchCollection = vchCollection;
    }

    @XmlTransient
    public Collection<EquipmentCleaningHistory> getECHCollection() {
        return echCollection;
    }

    public void setECHCollection(Collection<EquipmentCleaningHistory> echCollection) {
        this.echCollection = echCollection;
    }

    @XmlTransient
    public Collection<Administration> getAdminCollection1() {
        return adminCollection1;
    }

    public void setAdminCollection1(Collection<Administration> adminCollection1) {
        this.adminCollection1 = adminCollection1;
    }

    @XmlTransient
    public Collection<Administration> getAdminCollection2() {
        return adminCollection2;
    }

    public void setAdminCollection2(Collection<Administration> adminCollection2) {
        this.adminCollection2 = adminCollection2;
    }

    @XmlTransient
    public Collection<Administration> getAdminCollection3() {
        return adminCollection3;
    }

    public void setAdminCollection3(Collection<Administration> adminCollection3) {
        this.adminCollection3 = adminCollection3;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (empID != null ? empID.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Employee)) {
            return false;
        }
        Employee other = (Employee) object;
        if ((this.empID == null && other.empID != null) || (this.empID != null && !this.empID.equals(other.empID))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "com.openbrew.openbrewrf.Employee[ empID=" + empID + " ]";
    }
    
}
